package com.example.wac.exception;

/**
 * @author wuancheng
 * @description 自定义APP异常
 * @date 2021-12-30 17:30:00
 */

public class AppException extends RuntimeException{
    private String errorCode;

    private String errorDesc;

    public AppException(String errorCode, String errorDesc){
        // protected RuntimeException(String message, Throwable cause,boolean enableSuppression,boolean writableStackTrace)
        //启用删除 填写堆栈信息
        super(errorCode,null,false,true);
        this.errorCode = errorCode;
        this.errorDesc = errorDesc;
    }

    public String errorCode() {
        return errorCode;
    }

    public String errorDesc(){
        return errorDesc;
    }
}
